<?php
/**
 * 地铁
 */

namespace app\official\controller;


use app\common\controller\Official;
use think\Exception;

class Metro extends Official {

    /**
     * 地铁列表
     * @return false|string
     */
    public function getList() {
        try {
            $params = $this->checkParams('city_code');
            if ($params === false) {
                return $this->resErr();
            }
            $metro = \app\official\model\Metro::getList($params);//地铁
            return $this->resData('success', $metro);
        } catch (Exception $e) {
            return $this->resErr($e->getMessage(), $e->getCode());
        }
    }

}
